﻿#pragma once

#include "BaseGraphicView.h"

#include <boost/signal.hpp>
#include "../../abstract/IGameplayView.h"
#include "../../helpers/graphic/gameplay/GameEnd.h"
#include "../../helpers/graphic/gameplay/PlayerMenu.h"
#include "../../../utils/gui/Button.h"
#include "../../../utils/gui/Form.h"
#include "../../../domain/models/CardSet.h"
#include "../../../domain/models/Player.h"


namespace Views {
	namespace Graphic {
		class GameplayView: public IGameplayView, public BaseGraphicView
		{
		protected:
			boost::signals::connection connection;
			Helpers::Graphic::Gameplay::PlayerMenu* player_menu;
			Helpers::Graphic::Gameplay::PlayerLose* player_lose;
			Helpers::Graphic::Gameplay::PlayerWin* player_win;

			std::queue<std::pair<Cards::PlayerCard*, Players::PLAYER_TYPE>> players;

		public:
			GameplayView(Utils::GUI::Form*);

			virtual void startTurn(Players::Player*);
			virtual void endTurn(Players::Player*);
			virtual void openPickPlayersDialog(Cards::PlayersCards players_cards);
			virtual void playerLose(Players::Player*);
			virtual void playerWin(Players::Player*);

		protected:
			virtual void onPlayerLoseDialogClose();
			virtual void onPlayerWinDialogClose();
		};
	}
}

